package com.tanhua.api;

import com.tanhua.mapper.SettingsMapper;
import com.tanhua.sso.pojo.Settings;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class SettingsServiceApiImpi implements SettingsServiceApi{

    @Autowired
    private SettingsMapper settingsMapper;
    /*查看设置*/
    @Override
    public Settings selectById(Long userId) {
        Settings settings = settingsMapper.selectById(userId);
        return settings;
    }

    /*修改设置*/
    @Override
    public void update(Settings settings) {
        settingsMapper.updateById(settings);
    }

    /*保存设置*/
    @Override
    public void save(Settings newSettings) {
        settingsMapper.insert(newSettings);
    }
}
